/*
 * @Author: Soulmate
 * @Date: 2023-09-18 10:17:30
 * @LastEditTime: 2023-09-18 11:17:24
 * @LastEditors: Soulmate
 * @Description:
 * @FilePath: \ruoyi-ui-vue3\src\utils\mockExtend.ts
 * 版权声明
 */
import Mock from 'mockjs';

/**
 * Mock拓展钩子
 * desc: 生成月份数组
 * params: {
 *      e: 月份数
 *      months: 返回目标数组
 * }
 */
Mock.Random.extend({
    easyMin: function (e: number, lenth: number, mins: Array<any> = []) {
        for (var i = 0; i < +e; i++) {
            if (i % lenth == 0) mins.push(`16：${i < 10 ? '0' + i : i}`);
        }
        return mins;
    },
    easyMonth: function (e: number, months: Array<any> = []) {
        for (var i = 0; i < +e; i++) {
            months.push(`${i + 1}月`);
        }
        return months;
    },
});
export default Mock;
